import dev from './dev';
import prod from './prod';
import { Configuration } from 'koa-log4'
import { DataSourceOptions, DataSource } from "typeorm";

export interface ConfigType {
    port: string;
    staticPath: string;
    jwtKey: string;
    aliyunOssConfig: {
		accessKeyId: string,
		accessKeySecret: string,
	},
    routePrefix: {
		app: string;
		admin: string;
        apiPrefix: {
            app: {
                [key: string]: any
            };
            admin: {
                [key: string]: any
            }
        }
	},
    setPrefix: (path: string) => string;
    orm: DataSource;
    mysql: DataSourceOptions;
    logConfig: Configuration;
    cors: {
        Origin: string;
        Headers: string;
        configCors: () => object;
    }
}
export default process.env.NODE_ENV == "dev" ? dev : prod